package com.gt.wxpay.cashier.payChannel.application;

import com.gt.wxpay.cashier.domain.dto.QueryRefundDto;
import com.gt.wxpay.cashier.domain.model.CashierPayment;
import com.gt.wxpay.cashier.payChannel.callback.vo.WxNotifyVo;
import com.gt.wxpay.cashier.payChannel.callback.vo.WxPayRespDto;
import com.wechat.pay.java.service.payments.model.Transaction;
import com.wechat.pay.java.service.refund.model.Refund;

import javax.servlet.http.HttpServletRequest;

/**
 * @author @Mapper
 * @since 2017/9/25
 */
public interface WxPayService {

    /**
     * 发起付款
     * @param cashierPayment
     * @return
     * @throws Exception
     */
    WxPayRespDto unifiedOrderV3(CashierPayment cashierPayment);



    /**
     * 发起退款
     * @param cashierPayment
     * @return
     */
    Refund refundV3(CashierPayment cashierPayment);


    /**
     * 关闭支付订单
     */
    void closePayment(CashierPayment casherPayment);

    /**
     * 查询支付订单
     * @param mchId 商户号
     */
    Transaction queryOrderV3(String mchId, String transId);

    /**
     * 查询支付信息
     * @param payment 支付单
     */
    CashierPayment queryOrderInfo(CashierPayment payment);

    /**
     * 查询退款信息
     * @param refundOrder CashierPayment
     * @return QueryRefundDto
     */
    QueryRefundDto queryRefund(CashierPayment refundOrder);
}
